#ifndef _MQTTCLIENT_PUBLICSTRUCT_H_
#define _MQTTCLIENT_PUBLICSTRUCT_H_

#include <QString>
#include <QUuid>
#include <QDateTime>

struct CGroupOpt
{
	QString strId;
	QString strName;

	CGroupOpt()
	{
		strId = QUuid::createUuid().toString();
	}

	CGroupOpt& operator=(const CGroupOpt& other)
	{
		strId = other.strId;
		strName = other.strName;
		return *this;
	}
};

struct CConnectOpt
{
	QString strUuid;
	QString strName;
	QString strClientId;
	QString strAddress;
	uint16_t port;
	QString strUsername;
	QString strPasswd;
	QDateTime time;
	QString strDescribe;

	CConnectOpt()
	{
		strUuid = QUuid::createUuid().toString();
		port = 1883;
	}

	CConnectOpt& operator=(const CConnectOpt &other)
	{
		strUuid = other.strUuid;
		strName = other.strName;
		strClientId = other.strClientId;
		strAddress = other.strAddress;
		port = other.port;
		strUsername = other.strUsername;
		strPasswd = other.strPasswd;
		time = other.time;
		strDescribe = other.strDescribe;
		return *this;
	}

	bool operator==(const CConnectOpt &other)
	{
		return strUuid == other.strUuid;
	}
};


#endif
